package com.four.peoplemanage.cards.dao;

import com.four.peoplemanage.cards.entity.Cards;
import com.four.peoplemanage.gift.entity.Gift;
import com.four.peoplemanage.holiday.entity.Holiday;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CardsDao {
    // 查看所有门卡
    @Select(
            "SELECT * FROM traffic.cards " +
            "limit #{start}, #{size}" )
    List<Cards> canCards(int start, int size);
    //分页
    @Select(
            "SELECT count(*) FROM traffic.cards" )
    public int countCards();
    //添加
    @Insert("insert into cards (information_id,access_card_number,access_status,attendanc_card_number,attendanc_status,specia_channel_card_number,employee_access_status,onetimecard)"+
            "values (#{information_id},#{access_card_number},#{access_status},#{attendanc_card_number},#{attendanc_status},#{specia_channel_card_number},#{employee_access_status},#{onetimecard})")
    public int addCard(Cards cards);
}
